<template>
	<view class="mainpadding2">
		<view class="mainpadding_top ffffff radius" v-for="item in list.data" :key="item.id">
			<view class="flexbetween">
				<u-rate :value="item.q_pf" active-color="#fab634" readonly></u-rate>
				<view class="xiaohui">{{http.timereturn(item.createtime * 1000)}}</view>
			</view>
			<view class="xiaohui margin_top">{{item.q_txt}}</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				limit: 12,
				list: {
					data: [{}]
				},
				chudi: false
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			init(isPage, page) { //提现记录
				let _this = this;
				let url = '/api/goods/evaluatelist'
				this.http.request(url, 'POST', {
					page_num: page || 1,
					takeaway_id: uni.getStorageSync("takeaway_id"),
				}, false, false, true).then(res => {
					if (res.code == 1) {
						// res.data.forEach(item => {
						// 	let arr = item.images.split(",")
						// 	let arr2 = []
						// 	arr.forEach(value => {
						// 		arr2.push(this.imgUrlUser + value)
						// 	})
						// 	this.$set(item, "images_text", arr2)
						// 	if (item.user_data) {
						// 		item.user_data.avatar = this.imgUrlUser + item.user_data.avatar
						// 	}
						// })
						// console.log(res.data);
						_this.list.data = res.data;
					} else {
						this.chudi = true
					}
				}).catch(err => {
					this.http.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (this.chudi) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},
		}
	}
</script>

<style>

</style>
